package com.shiminghui;

import java.util.ArrayList;

public class Test3 {
    public static void main(String[] args) {

        ArrayList<Student> arrayList = new ArrayList<>();

        Student student = new Student("tom","man",78);
        Student student1 = new Student("cat","woman",78);

        arrayList.add(student);
        arrayList.add(student1);

        System.out.println(arrayList);

        for (int i = 0; i < arrayList.size(); i++) {
            Student student2 = arrayList.get(i);
            System.out.println(student2.getName()+","+student2.getGender()+","+student2.getAge());
        }

    }
}
